---
apiVersion: indicatorprotocol.io/v1
kind: IndicatorDocument

metadata:
  labels:
    deployment: <%= p("director.name") %>

spec:
  product:
    name: bosh_director
    version: 282.1.2
  indicators:
  - name: bosh_tasks_total
    promql: min_over_time(bosh_tasks_total{state="queued"}[10m])
    thresholds:
    - level: warning
      operator: gt
      value: <%= p("indicators.queued_tasks_threshold")%>
    documentation:
      title: Queued Tasks
      description: Alerts when the queued task count is over the threshold for 10 minutes. Tasks are queued when all director workers are busy.
      supported_labels:
        state: "State of the task (e.g. processing, queued...)"
        type: "Type of the task (e.g. update_deployment, snapshot_deployment...)"
  - name: bosh_resurrection_enabled
    promql: bosh_resurrection_enabled
  - name: bosh_deploy_config_enabled
    promql: bosh_deploy_config_enabled
  - name: bosh_networks_dynamic_ips_total
    promql: bosh_networks_dynamic_ips_total
    documentation:
      supported_labels:
        name: "Name of the network"
  - name: bosh_networks_dynamic_free_ips_total
    promql: bosh_networks_dynamic_free_ips_total
    documentation:
      supported_labels:
        name: "Name of the network"
